﻿using UnityEngine;
using System.Collections;

public class GameState : MonoBehaviour {

    /// GameState contains everything the interfaces need to know about.
    /// It contains a City and knows which view is currently showing. 
    /// In fact, it might split the views into different MonoBehaviours and 
    /// enable/disable them depending on their state? We'll see.

	// Use this for initialization

    public int ScoreMeter { get; private set; }

    void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnSerializeNetworkView(BitStream stream, NetworkMessageInfo info)
    {
        if (stream.isWriting)
        {
            int scoreMeter = ScoreMeter;
            stream.Serialize(ref scoreMeter);
        }
        else
        {
            int scoreMeter = 0;
            stream.Serialize(ref scoreMeter);
            ScoreMeter = scoreMeter;
        }
    }
}
